package cn.com.yiqi.wsc.common;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 何刚
 * @ClassName: ${class}
 * @Description: TODO
 * @date 2016/12/5
 */
public class Result<T> {

    private Map<String, Object> data = new HashMap<String, Object>();

    private T returnValue;

    //默认成功
    private int status = ResultEnum.SUCCESS.getValue();

    private String errMsg;

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    public T getReturnValue() {
        return returnValue;
    }

    public void setReturnValue(T returnValue) {
        this.returnValue = returnValue;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }


    public void putData(String key, Object value) {

        data.put(key, value);

    }
}
